/****** Object:  Table [dbo].[Architects]    Script Date: 04/18/2013 23:37:57 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Architects](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[FirstName] [varchar](50) NULL,
	[MiddleName] [varchar](50) NULL,
	[LastName] [varchar](50) NULL,
	[Gender] [varchar](50) NULL,
	[DOB] [datetime] NULL,
	[Biography] [text] NULL,
	[SponsorTitle] [varchar](50) NULL,
	[SponsorImage] [varchar](50) NULL,
 CONSTRAINT [PK_Architects] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


/****** Object:  Table [dbo].[ArchitecturalFirms]    Script Date: 04/18/2013 23:37:57 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[ArchitecturalFirms](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[ArchitectId] [int] NULL,
	[Name] [varchar](150) NULL,
	[Year] [varchar](50) NULL,
 CONSTRAINT [PK_ArchitecturalFirms] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

/****** Object:  Table [dbo].[ArchitecturalWorks]    Script Date: 04/18/2013 23:37:57 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[ArchitecturalWorks](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[ArchitectId] [int] NOT NULL,
	[Name] [varchar](150) NULL,
	[Suburb] [varchar](50) NULL,
	[Year] [varchar](50) NULL,
 CONSTRAINT [PK_ArchitecturalWorks] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


/****** Object:  able [dbo].[Contents]    Script Date: 04/18/2013 23:37:57 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Contents](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[PageTitle] [varchar](50) NULL,
	[PageName] [varchar](150) NULL,
	[PageContent] [text] NULL,
	[MetaKeyword] [varchar](160) NULL,
	[MetaDescription] [varchar](160) NULL,
 CONSTRAINT [PK_Content] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

/****** Object:  Table [dbo].[Menus]    Script Date: 04/18/2013 23:37:57 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Menus](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Name] [varchar](150) NULL,
	[IsParent] [bit] NULL,
	[ParentId] [int] NULL,
	[Link] [varchar](50) NULL,
	[OrderId] [int] NULL,
 CONSTRAINT [PK_Menu] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[ArchitecturalFirms]  WITH CHECK ADD  CONSTRAINT [FK_ArchitecturalFirms_Architects] FOREIGN KEY([ArchitectId])
REFERENCES [dbo].[Architects] ([Id])
GO

ALTER TABLE [dbo].[ArchitecturalFirms] CHECK CONSTRAINT [FK_ArchitecturalFirms_Architects]
GO

ALTER TABLE [dbo].[ArchitecturalWorks]  WITH CHECK ADD  CONSTRAINT [FK_ArchitecturalWorks_Architects] FOREIGN KEY([ArchitectId])
REFERENCES [dbo].[Architects] ([Id])
GO

ALTER TABLE [dbo].[ArchitecturalWorks] CHECK CONSTRAINT [FK_ArchitecturalWorks_Architects]
GO


